cd "/Users/"

"maintext_data.dta"

** Notes: the category nosettle=2 is for an unsettled border, 0 is for a settled border, and 1 is for missing values in the data
** 		  the names of the same variables sometimes change across the global and european samples

*********************************
*
* Hegemonic Volatility Measures 
*
*********************************  

xtset dyad_m

logit make_claim_onset_f hegevolatility00 shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3  if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, cl(dyad_m)

estimates store m1_0e, title(Model 0e)

clogit make_claim_onset_f hegevolatility00 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0,  group(dyad_m) r

estimates store m1_1e, title(Model 1e)



xtreg make_claim_onset_f hegevolatility00 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, vce(robust) fe

estimates store m1_2e, title(Model 2e)



logit make_claim_onset_f weighted_hege00 shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3  if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, cl(dyad_m)

estimates store m2_0e, title(Model 0e)

clogit make_claim_onset_f weighted_hege00 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0,  group(dyad_m) r

estimates store m2_1e, title(Model 1e)



xtreg make_claim_onset_f weighted_hege00 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, vce(robust) fe

estimates store m2_2e, title(Model 2e)


xtset dyadx



logit claim hegevolatility00 xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0g)

clogit claim hegevolatility00 mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 1g)



xtreg claim hegevolatility00 mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 2g)



logit claim weighted_hege00 xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0g)


clogit claim weighted_hege00 mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 1g)



xtreg claim weighted_hege00 mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 2g)


estout m1_0e m1_1e m1_2e  m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 



*********************************
*
* Internal Conflict Measures 
*
*********************************

xtset dyad_m


logit make_claim_onset_f weighted_intracon shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m1_0e, title(Model 0)


clogit make_claim_onset_f weighted_intracon mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m1_1e, title(Model 3b)




xtreg make_claim_onset_f weighted_intracon mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m1_2e, title(Model 7)



logit make_claim_onset_f perc_inflation shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m2_0e, title(Model 0)


clogit make_claim_onset_f perc_inflation mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m2_1e, title(Model 3b)



xtreg make_claim_onset_f perc_inflation mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m2_2e, title(Model 7)


xtset dyadx


logit claim weighted_intracon xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0)

clogit claim weighted_intracon mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 3b)



xtreg claim weighted_intracon mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 7)



logit claim perc_inflation xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0)

clogit claim perc_inflation mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 3b)


xtreg claim perc_inflation mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 7)



estout m1_0e m1_1e m1_2e  m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 



*********************************
*
*    Great Power War Measures 
*
*********************************


xtset dyad_m


logit make_claim_onset_f weighted_GPwar shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m1_0e, title(Model 0)


clogit make_claim_onset_f weighted_GPwar mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m1_1e, title(Model 3b)



xtreg make_claim_onset_f weighted_GPwar mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m1_2e, title(Model 7)



logit make_claim_onset_f perc_GPwar shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m2_0e, title(Model 0)


clogit make_claim_onset_f perc_GPwar mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m2_1e, title(Model 3b)


xtreg make_claim_onset_f perc_GPwar mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3, vce(robust) fe

estimates store m2_2e, title(Model 7)



xtset dyadx



logit claim weighted_war xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0, cl(dyadx)

estimates store m1_0g, title(Model 0)

clogit claim weighted_war mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0,  group(dyadx) r

estimates store m1_1g, title(Model 3b)



xtreg claim weighted_war mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 , vce(robust) fe

estimates store m1_2g, title(Model 7)



logit claim perc_GPwar mid5 xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0, cl(dyadx)

estimates store m2_0g, title(Model 0)

clogit claim perc_GPwar mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0,  group(dyadx) r

estimates store m2_1g, title(Model 3b)




xtreg claim perc_GPwar mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 , vce(robust) fe

estimates store m2_2g, title(Model 7)



estout   m2_0e m2_1e m2_2e m1_0e m1_1e m1_2e  m2_0g m2_1g m2_2g m1_0g m1_1g m1_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 


*********************************
*
*    Post-War Settlements 
*
*********************************


xtset dyad_m


logit make_claim_onset_f GP_warterm shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m1_0e, title(Model 0)


clogit make_claim_onset_f GP_warterm mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m1_1e, title(Model 3b)




xtreg make_claim_onset_f GP_warterm mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m1_2e, title(Model 7)




logit make_claim_onset_f weighted_GPwarterm shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m2_0e, title(Model 0)


clogit make_claim_onset_f weighted_GPwarterm mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m2_1e, title(Model 3b)




xtreg make_claim_onset_f weighted_GPwarterm mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m2_2e, title(Model 7)



xtset dyadx


logit claim GP_warterm xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0)

clogit claim GP_warterm mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 3b)



xtreg claim GP_warterm mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 7)



logit claim weighted_GPwarterm xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0)

clogit claim weighted_GPwarterm mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 3b)



xtreg claim weighted_GPwarterm mid5 i.nosettle defense_m both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 7)


estout m1_0e m1_1e m1_2e  m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 


******************************************
*
*      Breakup of Empires (Secession) 
*
******************************************

xtset dyad_m

logit make_claim_onset_f num_newdyads shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m1_0e, title(Model 0)


clogit make_claim_onset_f num_newdyads mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m1_1e, title(Model 3b)



xtreg make_claim_onset_f num_newdyads mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m1_2e, title(Model 7)



logit make_claim_onset_f num_secessions shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m2_0e, title(Model 0)


clogit make_claim_onset_f num_secessions mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m2_1e, title(Model 3b)



xtreg make_claim_onset_f num_secessions mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m2_2e, title(Model 7)



xtset dyadx



logit claim num_newdyads xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0)

clogit claim num_newdyads mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 3b)


xtreg claim num_newdyads mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 7)


logit claim num_secessions xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0)

clogit claim num_secessions mid5 i.nosettle both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 3b)



xtreg claim num_secessions mid5 i.nosettle both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 7)



estout m1_0e m1_1e m1_2e  m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 



**********************************
*
*      Great Power Proxies 
*
**********************************


xtset dyad_m

logit make_claim_onset_f proxywars_m shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m1_0e, title(Model 0)


clogit make_claim_onset_f proxywars_m mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m1_1e, title(Model 3b)



xtreg make_claim_onset_f proxywars_m mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m1_2e, title(Model 7)



logit make_claim_onset_f GPallych_sys_M shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, cl(dyad_m)

estimates store m2_0e, title(Model 0)


clogit make_claim_onset_f GPallych_sys_M mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0,  group(dyad_m) r

estimates store m2_1e, title(Model 3b)



xtreg make_claim_onset_f GPallych_sys_M mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0, vce(robust) fe

estimates store m2_2e, title(Model 7)



xtset dyadx



logit claim proxywars_m xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0)

clogit claim proxywars_m mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 3b)


xtreg claim proxywars_m mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 7)


logit claim GPallych_sys_M xx yx lengthkm claimyrs1 claimyrs2 claimyrs3  if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0)

clogit claim GPallych_sys_M mid5 i.nosettle both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 3b)


xtreg claim GPallych_sys_M mid5 i.nosettle both_democracy claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 7)



estout m1_0e m1_1e m1_2e m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 




*****************************************
*
* Combine Different Measures with PCA
*
*****************************************


xtset dyad_m

logit make_claim_onset_f pca_1 shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3  if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, cl(dyad_m)

estimates store m1_0e, title(Model 0e)

clogit make_claim_onset_f pca_1 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0,  group(dyad_m) r

estimates store m1_1e, title(Model 1e)



xtreg make_claim_onset_f pca_1 mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, vce(robust) fe

estimates store m1_2e, title(Model 2e)



logit make_claim_onset_f dw_pca shape_area_10 latitude longitude onsetyrs onsetyrs2 onsetyrs3  if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, cl(dyad_m)

estimates store m2_0e, title(Model 0e)

clogit make_claim_onset_f dw_pca mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0,  group(dyad_m) r

estimates store m2_1e, title(Model 1e)



xtreg make_claim_onset_f dw_pca mid5 i.nosettle defense both_democracy onsetyrs onsetyrs2 onsetyrs3 if majorpower_ch==0 & majorpower_ta==0 & globaldata==0, vce(robust) fe

estimates store m2_2e, title(Model 2e)

margins, at(dw_pca=(-.4079749 2.96274  4.844811))




xtset dyadx



logit claim pca_1 xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m1_0g, title(Model 0g)

clogit claim pca_1 mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m1_1g, title(Model 1g)



xtreg claim pca_1 mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m1_2g, title(Model 2g)



logit claim dw_pca_g xx yx lengthkm claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, cl(dyadx)

estimates store m2_0g, title(Model 0g)


clogit claim dw_pca_g mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1,  group(dyadx) r

estimates store m2_1g, title(Model 1g)




xtreg claim dw_pca_g mid5 i.nosettle both_democracy defense_m claimyrs1 claimyrs2 claimyrs3 if chal_major==0 & tgt_major==0 & globaldata==1, vce(robust) fe

estimates store m2_2g, title(Model 2g)

margins, at(dw_pca=(-.4233538 2.574022 5.291882))





estout m1_0e m1_1e m1_2e m2_0e m2_1e m2_2e m1_0g m1_1g m1_2g m2_0g m2_1g m2_2g, style(tex) starlevels(* 0.10 ** 0.05) cells(b(star fmt(3)) se(par fmt(2))) stats(N) 
